[tool.poetry]
name = "gigachat"
version = "0.1.12"
description = "GigaChat. Python-library for GigaChain and LangChain"
authors = ["Konstantin Krestnikov <rai220@gmail.com>", "Sergey Malyshev <in1t@ya.ru>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/ai-forever/gigachat"
packages = [{include = "gigachat", from = "src"}]

[tool.poetry.dependencies]
python = "^3.8"
pydantic = ">=1,<3"
httpx = "<1"

[tool.poetry.group.dev.dependencies]
black = "^23.12.1"
ruff = "^0.0.285"
mypy = "^1.8.0"
pytest = "^7.4.3"
pytest-httpx = [
    {version = "<=0.22.0", python = "~3.8"},
    {version = "^0.26.0", python = "^3.9"}
]
pytest-asyncio = "^0.21.1"
coverage = "<=7.3.0"
pytest-mock = "^3.12.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.black]
color = true
line-length = 120
target-version = ["py38"]

[tool.ruff]
extend-select = [ "A", "B", "C4", "C90", "I", "Q", "PERF", "PT", "RUF100", "UP", "W"]
line-length = 120
src = ["src"]
target-version = "py38"

[tool.ruff.mccabe]
max-complexity = 10

[tool.mypy]
plugins = "pydantic.mypy"
strict = true
exclude = "src/gigachat/pydantic_v1"

[tool.pytest.ini_options]
pythonpath = ["src"]
xfail_strict = true

[tool.coverage.run]
branch = true
source = ["src"]
omit = ["*/pydantic_v1/*"]

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "raise NotImplementedError",
    "if TYPE_CHECKING:",
    "if typing.TYPE_CHECKING:",
    "@overload",
    "@typing.overload",
    "assert_never",
]
#show_missing = true
#skip_covered = true
